import fetch from '@/axios/fetch'

export function tree () {
  return fetch({
    url: '/api/directory/tree',
    method: 'get'
  })
}


export function add(obj) {
  return fetch({
    url: '/api/directory/add',
    method: 'post',
    data: obj
  })
}

export function rename(obj) {
  return fetch({
     url: '/api/directory/rename',
    method: 'post',
    data: obj
  })
}

export function remove(obj) {
  return fetch({
    url: '/api/directory/delete/'+obj,
    method: 'delete',
  })
}

export function move(obj) {
  return fetch({
     url: '/api/directory/move',
    method: 'post',
    data: obj
  })
}
